import static org.junit.Assert.*;
import junit.framework.TestCase;

import org.junit.Before;
import org.junit.Test;
import java.awt.*;
import java.text.SimpleDateFormat;
import java.util.Calendar;

public class sundialGuiTest extends TestCase{

	private sundialGui gui;

	    public sundialGuiTest(String name) {
	        super(name);
	    }

	    @Before
	    public void setUp() throws Exception {
	        gui = new sundialGui(new javax.swing.JFrame(), false);
	        gui.initComponents();
	    }
	    
	    /* Test the date function for accuracy*/
	    @Test
	    public void testdate(){
	    	//Set
	    	Calendar cal = Calendar.getInstance();
	    	SimpleDateFormat dateFormat = new SimpleDateFormat ("MM/dd/yyyy");
	    	String testDate = dateFormat.format(cal.getTime());
	    	assertTrue(testDate.equals(gui.sDate));
	    }
	    

}
